const util = require('../../utils/util1');
const app = getApp();

let o;

Page({
  data: {
    action: {
      method: 'play'
    },
    bgImages: '/img/imgs/wishes-panel.png',
    toname: '小仙女',
    today: util.today(),
    sentence: '新年快乐哦(´-ω-`)，没有我陪在你身边的日子里记得要照顾好自己。天气冷了，衣服别忘了添，生活有很多烦恼但是我会一直祝福你，殷切的希望我们都能在这个寒冷的冬天更加的温暖(｡･ω･｡)',
    imgurl: 'https://img.weyifen.com/hongbao/gif/136.gif',
    // imgadio: 'https://img.weyifen.com/hongbao/gif/music/441.wav',
    tempFilePaths: '/img/gh_a56baab4157c_1280.png',
    //isimg:true
  },
  onLoad:function() {
    if (!app.globalData.userInfo) {
       app.getUserInfo()
    }
    /*var that = this
    var istrue = 0;
    var Interval = setInterval(function () {
      console.log("istrue", istrue)
      //循环执行代码  
      istrue = istrue + 1;
      if (istrue > 20) {
        console.log("isimg", that.data.isimg)
        that.setData({
          isimg: false
        })
        clearInterval(Interval)
      }
    }, 1000) *///循环时间 这里是1秒   
  },
  /**监控返回 */
 /* onUnload: function () {
    this.setData({
      imgadio: ''
    })
  },*/
   onShow() {
    let that = this;
    // 获取用户信息
    app.getUserInfos(function (userInfo) {
      
      that.setData({
        userInfo: userInfo
      })
    })
  },
  zhizuo:function () {
    wx.navigateTo({
      url: '/pages/preview/preview?state=0'
    })
  }
})
